package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.ProviderDao;
import com.neuedu.dao.ProviderDao;
import com.neuedu.model.Provider;
import com.neuedu.service.ProviderService;

@Service
public class ProviderServiceImpl implements ProviderService {

	// 依赖注入
	@Autowired
	private ProviderDao providerDao;
	
	public void setProviderDao(ProviderDao providerDao) {
		this.providerDao = providerDao;
	}
	
	@Override
	public int countProvider() {
		return providerDao.countProvider();
	}

	@Override
	public List<Provider> findAll(Map<String, Object> map) {
		return providerDao.findAll(map);
	}

	@Override
	public int addProvider(Provider u) {
		return providerDao.addProvider(u);
	}

	@Override
	public int updateProvider(Provider u) {
		return providerDao.updateProvider(u);
	}

	@Override
	public int deleteProvider(int id) {
		return providerDao.deleteProvider(id);
	}

	@Override
	public List<Provider> findList() {
		// TODO Auto-generated method stub
		return providerDao.findList();
	}

}
